﻿namespace EFMLEditor
{
    using System;
    using System.Windows.Forms;

    public class DesignPage : UserControl
    {
        #region Fields


        /// <summary>
        /// 	Erforderliche Designervariable.
        /// </summary>
        private readonly System.ComponentModel.IContainer components = null;

        #endregion

        #region Constructors and Destructors

        public DesignPage()
        {
            this.InitializeComponent();

            AutoScroll = true;
        }

        public void AddProperty(string name, Type t, object value, object Default)
        {
            var prop = new Property();
            prop.Init(name, t, value, Default);
            prop.Dock = DockStyle.Top;
            
            Controls.Add(prop);
        }

        #endregion

        #region Methods

        /// <summary>
        /// 	Verwendete Ressourcen bereinigen.
        /// </summary>
        /// <param name="disposing"> True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. </param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        /// <summary>
        /// 	Erforderliche Methode für die Designerunterstützung. 
        /// 	Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            this.SuspendLayout();
            // 
            // DesignPage
            // 
            this.Name = "DesignPage";
            this.Size = new System.Drawing.Size(581, 277);
            this.ResumeLayout(false);

        }

        #endregion
    }
}